<#include "/admin/common/include/html_head.html">
<!-- self css start -->
<link href="${contextPath}/admin/self/css/desktop.css" rel="stylesheet"
	type="text/css" />
<link href="${contextPath}/admin/self/css/home.css" rel="stylesheet"
	type="text/css" />
<!-- self css end -->

<div class="home-container">
	<div class="home-panel home-coloum-3" data-column="4">
		<div class="home-panelHead">
			<span class="title home-icon-attendance">访问统计</span><a
				class="rightBtn">更多</a>
		</div>
		<div class="home-panelContent attentdance-panel">
			<div class="left">
				<div id="pie" class="pie-container">
					<svg height="160" version="1.1" width="160"
						xmlns="http://www.w3.org/2000/svg"
						xmlns:xlink="http://www.w3.org/1999/xlink"
						style="overflow: hidden; position: relative; left: -0.5px; top: -0.5px;">
						<desc style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Created with Raphaël 2.2.0</desc>
						<defs style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></defs>
						<circle cx="80" cy="80" r="80" fill="#eeeeee" stroke="none"
							style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle>
						<path fill="#7bdbdc" stroke="none"
							d="M80,80L80,0A80,80,0,0,0,79.99999999999999,0Z"
							style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
						<path fill="#fedf8a" stroke="none"
							d="M80,80L79.99999999999999,0A80,80,0,1,0,80,0Z"
							style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
						<circle cx="80" cy="80" r="48" fill="#ffffff" stroke="none"
							style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></circle></svg>
					<span><span class="monthday"><span class="daynum">${templatePackageCount}</span><span>个</span></span><span>网站应用</span></span>
				</div>
			</div>
			<div class="right">
				<span class="title">${(appMonthlyAccess.month)?if_exists}月份访问情况</span>
				<div class="exception-block">
					<span class="expTitle">总浏览量</span><span class="expNum"><span>${(appMonthlyAccess.pv)?if_exists}</span><span
						class="unit">次</span></span>
				</div>
				<div class="exception-block">
					<span class="expTitle">访客数</span><span class="expNum"><span>${(appMonthlyAccess.uv)?if_exists}</span><span
						class="unit">次</span></span>
				</div>
				<div class="exception-block">
					<span class="expTitle">访客访问次数</span><span class="expNum"><span>${(appMonthlyAccess.vv)?if_exists}</span><span
						class="unit">次</span></span>
				</div>
				<div class="exception-block">
					<span class="expTitle">ip数</span><span class="expNum"><span>${(appMonthlyAccess.ip)?if_exists}</span><span
						class="unit">次</span></span>
				</div>
			</div>
		</div>
	</div>
	<div class="home-panel home-coloum-1" data-column="1">
		<div class="home-panelHead">
			<span class="title home-icon-enter">快捷入口</span>
		</div>
		<div class="home-panelContent startflow-panel">
			<a target="_self" href="${contextPath}/template/show.op" title="模板管理" class="startflow-btn">模板管理</a>
			<a target="_self" href="${contextPath}/groupkey/showNav.op" title="分类管理" class="startflow-btn">分类管理</a>
			<a target="_self" href="${contextPath}/image/showBanner.op" title="分类管理" class="startflow-btn">栏目管理</a>
			<a target="_self" href="${contextPath}/image/show.op" title="分类管理" class="startflow-btn">图片管理</a>
		</div>
	</div>
	<div class="home-panel home-coloum-4">
		<div class="home-panelHead">  
			<span class="title home-icon-myflow">统计分析</span><a class="rightBtn">更多</a>
		</div>
		<div class="home-panelContent" id="static_chart_panel">
			<canvas id="static_chart"></canvas>
		</div>
	</div>

</div>
<script>
	$(window).load(function() {
		initDailyChart();
	});

	function initDailyChart() {
		var dateList = new Array();
		<#list lastWeekList  as day>
			dateList.push(${day});
		</#list> 
	    var datasets = new Array();
		<#list lastWeekAccess  as app>
			var accessCount = new Array();
			<#list app.accessList  as access>
				
				accessCount.push(${access.pv?c}); 
			</#list> 
			datasets.push({
				fillColor : "rgba(151,187,205,0.5)",
				strokeColor : "rgba(151,187,205,1)",
				pointColor : "rgba(151,187,205,1)",
				pointStrokeColor : "#fff",
				data : accessCount,
				spanGaps : false 
			});
		</#list> 
		var static_chart_height = $("#static_chart_panel").height() - 5;
		var static_chart_width = $("#static_chart_panel").width() - 5;
		$('#static_chart').css('height', static_chart_height);
		$('#static_chart').css('width', static_chart_width);
		$('#static_chart').attr('height', static_chart_height);
		$('#static_chart').attr('width', static_chart_width);
	 
		var data = {
			labels : dateList,
			datasets : datasets
		}

		setIntroChart();

		function setIntroChart() {
			var ctx = document.getElementById("static_chart").getContext("2d");
			new Chart(ctx).Line(data, {});
		}
	}
</script>


<#include "/admin/common/include/html_bottom.html">
